/*******************************************
 * Copyright 2007 Aphrodite Framework for javaME .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Email : owner@aphroditeme.dev.java.net
 * Contributors:
 *     Kent Elton - initial API and implementation
*******************************************/

package com.aphrodite.xml.wap;

import java.io.IOException;
import java.io.InputStream;

/**
 * A parser for WML built on top of the WbxmlParser by setting the corresponding
 * TagTable, AttrStartTable and AttrValueTable defined in the class Wml
 */
public class WmlParser extends WbxmlParser {

	public WmlParser(InputStream in) throws IOException {

		super(in);

		setTagTable(0, Wml.tagTable);
		setAttrStartTable(0, Wml.attrStartTable);
		setAttrValueTable(0, Wml.attrValueTable);
	}

	/*
	 * public ParseEvent parseWapExtension (int id) {
	 * 
	 * public void ext_i (int id, String par) throws SAXException { String dec =
	 * "$("+par+")";
	 * 
	 * dh.characters (dec.toCharArray (), 0, dec.length ()); }
	 * 
	 * public void ext_t (int id, int par) throws SAXException {
	 * 
	 * StringBuffer buf = new StringBuffer ();
	 * 
	 * while (stringTable [par] != 0) buf.append (stringTable [par++]);
	 * 
	 * ext_i (id, buf.toString ()); }
	 * 
	 * public void opaque (byte [] bytes) throws SAXException { throw new
	 * SAXException ("OPAQUE invalid in WML"); }
	 * 
	 * public void ext (int id) throws SAXException { throw new SAXException
	 * ("EXT_"+id+" reserved in WML"); }
	 */
}
